package com.example.photograph.service.impl;


import com.example.photograph.domain.SysBag;
import com.example.photograph.domain.SysUser;
import com.example.photograph.service.ISysBagService;
import com.example.photograph.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * html调用 thymeleaf 实现参数管理
 * 
 * @author wuyj
 */
@Service("view")
public class ViewService {

    @Autowired
    private ISysUserService sysUserService;
    @Autowired
    private ISysBagService sysBagService;

    public List<SysUser> getStaffs()
    {
        SysUser user = new SysUser();
        user.setRoleKey("staff");
        return sysUserService.selectUserList(user);
    }

    public List<SysUser> getClients()
    {
        SysUser user = new SysUser();
        user.setRoleKey("client");
        return sysUserService.selectUserList(user);
    }

    public List<SysBag> getBags()
    {
        return sysBagService.selectSysBagList(new SysBag());
    }
}
